﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using eBay.Service.Core.Soap;

namespace eBayBus.Block
{
    public class ReturnBlock
    {
        public static Dictionary<string, string> _ReturnBlocks = new Dictionary<string, string>();

        public ReturnBlock()
        {
            Init();
        }

        private static void Init()
        {
            if (_ReturnBlocks.Keys.Count > 0) return;
            
            _ReturnBlocks.Add("US_3_MONEYBACK_BUYER", "US_3_MONEYBACK_BUYER");
        }

        public static Dictionary<string, string> GetAll()
        {
            Init();
            return _ReturnBlocks;
        }

        public static void SetBlock(string key, ItemType i1)
        {

            switch (key)
            {
                case "US_3_MONEYBACK_BUYER":

                    #region US_3_MONEYBACK_BUYER

                    ReturnPolicyType ReturnPolicy = new ReturnPolicyType();

                    ReturnPolicy.ReturnsAcceptedOption = "ReturnsAccepted";
                    ReturnPolicy.ReturnsWithinOption = "Days_3";
                    ReturnPolicy.RefundOption = "MoneyBack";
                    ReturnPolicy.ShippingCostPaidBy = "Buyer";
                    ReturnPolicy.Description = "Return Description";
                    i1.ReturnPolicy = ReturnPolicy;


                    #endregion

                    break;

                default:
                    break;
            }

        }
    }
}
